Skip to content

Commit

Permalink
def print_and_return(value):
Browse files Browse the repository at this point in the history
  • Loading branch information
turulomio committed Nov 1, 2018
1 parent 5fee8bc commit f732970
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 23 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Dependencies

Changelog
=========
1.2.0
* Due to a boolean logic error, some changes didn't took place

1.1.0
* Added 30 seconds to reload video in howto.py
* Nothing is changed if --user --group --files or --directories is not set.
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = RecPermissions
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.1.0
PROJECT_NUMBER = 1.2.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Binary file modified doc/ttyrec/recpermissions_howto_en
Binary file not shown.
Binary file modified doc/ttyrec/recpermissions_howto_en.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/ttyrec/recpermissions_howto_es
Binary file not shown.
Binary file modified doc/ttyrec/recpermissions_howto_es.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions locale/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TooManyFiles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-01 20:12+0100\n"
"POT-Creation-Date: 2018-11-01 20:36+0100\n"
"PO-Revision-Date: 2018-10-22 18:51+0100\n"
"Last-Translator: root <[email protected]>\n"
"Language-Team: Spanish\n"
Expand All @@ -21,11 +21,14 @@ msgstr ""
msgid "New Release:"
msgstr "Nueva versión:"

msgid " * Cambiar la versión y la fecha en version.py"
msgstr ""
msgid " * Change version and date in version.py"
msgstr " * Cambiar la versión y la fecha en version.py"

msgid " * Modificar el Changelog en el fichero README"
msgstr ""
msgid " * Edit Changelog in README"
msgstr " * Modificar el Changelog en README"

msgid "If changed restart from first python setup.py doc"
msgstr "Si se cambia, reiniciar desde el primer 'python setup.py doc'"

msgid " * Make a new tag in github"
msgstr " * Hacer un nuevo tag en GitHub"
Expand Down
9 changes: 6 additions & 3 deletions locale/recpermissions.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-01 20:12+0100\n"
"POT-Creation-Date: 2018-11-01 20:38+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -20,10 +20,13 @@ msgstr ""
msgid "New Release:"
msgstr ""

msgid " * Cambiar la versión y la fecha en version.py"
msgid " * Change version and date in version.py"
msgstr ""

msgid " * Modificar el Changelog en el fichero README"
msgid " * Edit Changelog in README"
msgstr ""

msgid "If changed restart from first python setup.py doc"
msgstr ""

msgid " * Make a new tag in github"
Expand Down
2 changes: 1 addition & 1 deletion man/es/man1/recpermissions.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ recpermissions /home/user
.PP
.RS
.RS
This comand does nothing
Este comando no hace nada
.RE
.RE
.PP
Expand Down
2 changes: 1 addition & 1 deletion man/man1/recpermissions.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ recpermissions /home/user
.PP
.RS
.RS
This comand does nothing
Este comando no hace nada
.RE
.RE
.PP
Expand Down
11 changes: 7 additions & 4 deletions recpermissions/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ def main(arguments=None):
if os.path.exists(dirname)==False:
error_files.append(dirname)
continue
b_permissions=set_octal_string_permissions(dirname,args.directories)
b_ownership=set_file_ownership(dirname, args.user, args.group)

if (set_octal_string_permissions(dirname,args.directories) or set_file_ownership(dirname, args.user, args.group))==True:
if b_permissions==True or b_ownership==True:
changed_dirs.append(dirname)

if args.remove_emptydirs==True:
Expand All @@ -134,10 +136,11 @@ def main(arguments=None):
if os.path.exists(filename)==False:
error_files.append(filename)
continue

if (set_octal_string_permissions(filename, args.files) or set_file_ownership(filename, args.user, args.group))==True:
changed_files.append(dirname)

b_permissions=set_octal_string_permissions(filename, args.files)
b_ownership=set_file_ownership(filename, args.user, args.group)
if b_permissions or b_ownership==True:
changed_files.append(dirname)

print(Style.BRIGHT + _("RecPermissions summary:"))
print(Style.BRIGHT + Fore.GREEN + " * " + Fore.RESET + _("Directories found: ") + Fore.YELLOW + str(found_dirs))
Expand Down
Binary file modified recpermissions/locale/es/LC_MESSAGES/recpermissions.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion recpermissions/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import datetime

__versiondate__ = datetime.date(2018, 11, 1)
__version__ = '1.1.0'
__version__ = '1.2.0'
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def finalize_options(self):

def run(self):
print(_("New Release:"))
print(_(" * Cambiar la versión y la fecha en version.py"))
print(_(" * Modificar el Changelog en el fichero README"))
print(" * python3 setup.py doc")
print(_(" * Change version and date in version.py"))
print(_(" * Edit Changelog in README"))
print(" * python setup.py doc")
print(" * mcedit locale/es.po")
print(" * python3 setup.py doc")
print(" * python3 setup.py install")
print(" * python3 setup.py doxygen")
print(" * python setup.py doc")
print(" * python setup.py install")
print(" * python setup.py doxygen")
print(" * mcedit doc/ttyrec/howto.py")
print(" * python3 setup.py video")
print(" * python setup.py video" + ". " + _("If changed restart from first python setup.py doc"))
print(" * git commit -a -m 'Comment'")
print(" * git push")
print(_(" * Make a new tag in github"))
Expand Down

0 comments on commit f732970

Please sign in to comment.