Compare commits
No commits in common. "721632baf842407d073e169c2010e29350f3db0d" and "8ce1846288ea10d9e86e7ffef8b793efff320d8c" have entirely different histories.
721632baf8
...
8ce1846288
11
README.md
11
README.md
|
@ -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
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a [copy of the GNU General Public License](LICENSE)
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with gcp. If not, see <http://www.gnu.org/licenses/>.
|
gcp. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
About
|
About
|
||||||
|
@ -39,7 +39,7 @@ functionalities such as:
|
||||||
- **Files saving**: you can keep track of the files you have copied, and copy
|
- **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
|
them again later (useful when, for example, you copy some free music to your
|
||||||
friends on a regular basis).
|
friends on a regular basis).
|
||||||
- gcp will be **approximately option-compatible with (GNU) cp** (approximately
|
- gcp will be **approximately option-compatible with cp** (approximately
|
||||||
because the behaviour is not exactly the same, see below).
|
because the behaviour is not exactly the same, see below).
|
||||||
|
|
||||||
**WARNING**: gcp is at a relatively early stage of development, use at your own
|
**WARNING**: gcp is at a relatively early stage of development, use at your own
|
||||||
|
@ -72,14 +72,13 @@ On Debian-based systems
|
||||||
How to use it?
|
How to use it?
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Pretty much like cp (see `gcp --help` and `man gcp`).
|
Pretty much like cp (see `gcp --help`).
|
||||||
|
|
||||||
Please note that the behaviour is not exactly the same as cp's, even if 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
|
aims to be option-compatible. Mainly, the destination filenames can be modified
|
||||||
(cf. the `--fix-filenames` option).
|
(cf. the `--fix-filenames` option).
|
||||||
|
|
||||||
gcp doesn't implement all the options GNU cp has yet, but it's a long-term
|
gcp doesn't implement all the options from cp yet, but it's a long-term goal.
|
||||||
goal.
|
|
||||||
|
|
||||||
|
|
||||||
Logging
|
Logging
|
||||||
|
|
2
fr.po
2
fr.po
|
@ -8,7 +8,7 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.2.1.dev1\n"
|
"Project-Id-Version: 0.2.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-09-30 18:05+0800\n"
|
"POT-Creation-Date: 2010-09-30 18:05+0800\n"
|
||||||
"PO-Revision-Date: 2018-10-14 20:56+0200\n"
|
"PO-Revision-Date: 2018-10-14 20:56+0200\n"
|
||||||
|
|
12
gcp
12
gcp
|
@ -57,7 +57,7 @@ except ImportError as e:
|
||||||
|
|
||||||
NAME = "gcp (Gcp CoPier)"
|
NAME = "gcp (Gcp CoPier)"
|
||||||
NAME_SHORT = "gcp"
|
NAME_SHORT = "gcp"
|
||||||
VERSION = '0.2.1.dev1'
|
VERSION = '0.2.0'
|
||||||
|
|
||||||
ABOUT = NAME_SHORT + " " + VERSION + """
|
ABOUT = NAME_SHORT + " " + VERSION + """
|
||||||
---
|
---
|
||||||
|
@ -81,6 +81,7 @@ const_JOURNAL_PATH = const_FILES_DIR + "/journal"
|
||||||
const_SAVED_LIST = const_FILES_DIR + "/saved_list"
|
const_SAVED_LIST = const_FILES_DIR + "/saved_list"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DbusObject(dbus.service.Object):
|
class DbusObject(dbus.service.Object):
|
||||||
|
|
||||||
def __init__(self, gcp, bus, path):
|
def __init__(self, gcp, bus, path):
|
||||||
|
@ -115,9 +116,7 @@ class DbusObject(dbus.service.Object):
|
||||||
return (False, _("INTERNAL ERROR: invalid source_dir"))
|
return (False, _("INTERNAL ERROR: invalid source_dir"))
|
||||||
return self._gcp.parseArguments(args, source_dir)
|
return self._gcp.parseArguments(args, source_dir)
|
||||||
|
|
||||||
|
|
||||||
class Journal():
|
class Journal():
|
||||||
|
|
||||||
def __init__(self, path=const_JOURNAL_PATH):
|
def __init__(self, path=const_JOURNAL_PATH):
|
||||||
self.journal_path = os.path.expanduser(path)
|
self.journal_path = os.path.expanduser(path)
|
||||||
self.journal_fd = open(self.journal_path,'w') #TODO: check and maybe save previous journals
|
self.journal_fd = open(self.journal_path,'w') #TODO: check and maybe save previous journals
|
||||||
|
@ -184,6 +183,8 @@ class Journal():
|
||||||
info(_("Please check journal: %s") % self.journal_path)
|
info(_("Please check journal: %s") % self.journal_path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GCP():
|
class GCP():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -257,6 +258,7 @@ class GCP():
|
||||||
error(_("Can't copy %(path)s: %(exception)s")
|
error(_("Can't copy %(path)s: %(exception)s")
|
||||||
% {'path':path, 'exception':e.strerror})
|
% {'path':path, 'exception':e.strerror})
|
||||||
|
|
||||||
|
|
||||||
def __appendDirToList(self, dirpath, dest_path, options):
|
def __appendDirToList(self, dirpath, dest_path, options):
|
||||||
"""Add recursively directory to the copy list
|
"""Add recursively directory to the copy list
|
||||||
@param path: absolute path of dir
|
@param path: absolute path of dir
|
||||||
|
@ -375,6 +377,8 @@ class GCP():
|
||||||
source_fd.close()
|
source_fd.close()
|
||||||
dest_fd.close()
|
dest_fd.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _copyFile(self, source_fd, condition, data):
|
def _copyFile(self, source_fd, condition, data):
|
||||||
"""Actually copy the file, callback used with io_add_watch
|
"""Actually copy the file, callback used with io_add_watch
|
||||||
@param source_fd: file descriptor of the file to copy
|
@param source_fd: file descriptor of the file to copy
|
||||||
|
@ -516,6 +520,7 @@ class GCP():
|
||||||
if not args:
|
if not args:
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
|
||||||
if options.sources_list or options.sources_full_list:
|
if options.sources_list or options.sources_full_list:
|
||||||
info(_('Saved sources:'))
|
info(_('Saved sources:'))
|
||||||
sources = list(saved_files.keys())
|
sources = list(saved_files.keys())
|
||||||
|
@ -747,3 +752,4 @@ if __name__ == "__main__":
|
||||||
exit(1)
|
exit(1)
|
||||||
if gcp.journal.partial:
|
if gcp.journal.partial:
|
||||||
exit(2)
|
exit(2)
|
||||||
|
|
||||||
|
|
2
gcp.pot
2
gcp.pot
|
@ -5,7 +5,7 @@
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.2.1.dev1\n"
|
"Project-Id-Version: 0.2.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-10-14 20:51+0200\n"
|
"POT-Creation-Date: 2018-10-14 20:51+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
|
Loading…
Reference in New Issue