Compare commits

...

3 Commits

5 changed files with 12 additions and 17 deletions

View File

@ -16,8 +16,8 @@ gcp is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
gcp. If not, see <http://www.gnu.org/licenses/>.
You should have received a [copy of the GNU General Public License](LICENSE)
along with gcp. If not, see <http://www.gnu.org/licenses/>.
About
@ -39,7 +39,7 @@ functionalities such as:
- **Files saving**: you can keep track of the files you have copied, and copy
them again later (useful when, for example, you copy some free music to your
friends on a regular basis).
- gcp will be **approximately option-compatible with cp** (approximately
- gcp will be **approximately option-compatible with (GNU) cp** (approximately
because the behaviour is not exactly the same, see below).
**WARNING**: gcp is at a relatively early stage of development, use at your own
@ -72,13 +72,14 @@ On Debian-based systems
How to use it?
==============
Pretty much like cp (see `gcp --help`).
Pretty much like cp (see `gcp --help` and `man gcp`).
Please note that the behaviour is not exactly the same as cp's, even if gcp
aims to be option-compatible. Mainly, the destination filenames can be modified
(cf. the `--fix-filenames` option).
gcp doesn't implement all the options from cp yet, but it's a long-term goal.
gcp doesn't implement all the options GNU cp has yet, but it's a long-term
goal.
Logging

2
fr.po
View File

@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 0.2.0\n"
"Project-Id-Version: 0.2.1.dev1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-30 18:05+0800\n"
"PO-Revision-Date: 2018-10-14 20:56+0200\n"

12
gcp
View File

@ -57,7 +57,7 @@ except ImportError as e:
NAME = "gcp (Gcp CoPier)"
NAME_SHORT = "gcp"
VERSION = '0.2.0'
VERSION = '0.2.1.dev1'
ABOUT = NAME_SHORT + " " + VERSION + """
---
@ -81,7 +81,6 @@ const_JOURNAL_PATH = const_FILES_DIR + "/journal"
const_SAVED_LIST = const_FILES_DIR + "/saved_list"
class DbusObject(dbus.service.Object):
def __init__(self, gcp, bus, path):
@ -116,7 +115,9 @@ class DbusObject(dbus.service.Object):
return (False, _("INTERNAL ERROR: invalid source_dir"))
return self._gcp.parseArguments(args, source_dir)
class Journal():
def __init__(self, path=const_JOURNAL_PATH):
self.journal_path = os.path.expanduser(path)
self.journal_fd = open(self.journal_path,'w') #TODO: check and maybe save previous journals
@ -183,8 +184,6 @@ class Journal():
info(_("Please check journal: %s") % self.journal_path)
class GCP():
def __init__(self):
@ -258,7 +257,6 @@ class GCP():
error(_("Can't copy %(path)s: %(exception)s")
% {'path':path, 'exception':e.strerror})
def __appendDirToList(self, dirpath, dest_path, options):
"""Add recursively directory to the copy list
@param path: absolute path of dir
@ -377,8 +375,6 @@ class GCP():
source_fd.close()
dest_fd.close()
def _copyFile(self, source_fd, condition, data):
"""Actually copy the file, callback used with io_add_watch
@param source_fd: file descriptor of the file to copy
@ -520,7 +516,6 @@ class GCP():
if not args:
exit(0)
if options.sources_list or options.sources_full_list:
info(_('Saved sources:'))
sources = list(saved_files.keys())
@ -752,4 +747,3 @@ if __name__ == "__main__":
exit(1)
if gcp.journal.partial:
exit(2)

View File

@ -5,7 +5,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.2.0\n"
"Project-Id-Version: 0.2.1.dev1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-14 20:51+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

View File

@ -6,7 +6,7 @@ name = 'gcp'
setuptools.setup(
name=name,
version='0.2.0',
version='0.2.1.dev1',
url='https://code.lm7.fr/mcy/gcp',
license='GPL-3+',