OS: Windows 8.1 update 1
Qcma - Crossplatform content manager for the PSVita
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Forum rule Nº 15 is strictly enforced in this subforum.
-
- Posts: 60
- Joined: Fri Jul 19, 2013 10:42 am
Re: QCMA - Cross-platform content manager for the PSVita (0.
Just passing by to mention the new windows version is working great, thanks.
OS: Windows 8.1 update 1
OS: Windows 8.1 update 1
Advertising
-
- Big Beholder
- Posts: 1660
- Joined: Wed Jan 19, 2011 3:45 pm
- Location: /dev/negi
Re: QCMA - Cross-platform content manager for the PSVita (0.
@Xian: checked yor script, the idea is good, sadly i cannot use that changelog format because debian uses a very strict format: https://www.debian.org/doc/debian-polic ... gchangelog
The script is simple enough to only require a main body but if you make it bigger then consider using some functions and make use of the "if __name__ == '__main__':" stuff.
The script is simple enough to only require a main body but if you make it bigger then consider using some functions and make use of the "if __name__ == '__main__':" stuff.
Advertising
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
-
- Retired Mod
- Posts: 2744
- Joined: Fri Nov 05, 2010 5:27 pm
- Location: Over the hills and far away
Re: QCMA - Cross-platform content manager for the PSVita (0.
Should be feasible to make a converter, I think. I'll look into it.codestation wrote:@Xian: checked yor script, the idea is good, sadly i cannot use that changelog format because debian uses a very strict format: https://www.debian.org/doc/debian-polic ... gchangelog
-
- Big Beholder
- Posts: 1660
- Joined: Wed Jan 19, 2011 3:45 pm
- Location: /dev/negi
Re: QCMA - Cross-platform content manager for the PSVita (0.
What about one that can read the commit entries between the last tag and HEAD and generate a new set of entries in the changelog? I have looked for that everywhere and always end making the changelog by hand ( found some perl scripts but they are too old and don't work anymore).
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
-
- Retired Mod
- Posts: 2744
- Joined: Fri Nov 05, 2010 5:27 pm
- Location: Over the hills and far away
Re: QCMA - Cross-platform content manager for the PSVita (0.
Something along the lines of this?
- Get output from git log v0.3.1..v0.3.2 --pretty=oneline --abbrev-commit (if v0.3.2 is not specified, it will just go to HEAD)
- Add header/footer based on format (rpm/deb)
- Save to temp file and open it in nano
- Once nano exits, continue
The only thing is, is that the correct git command to use for the occasion?
- Get output from git log v0.3.1..v0.3.2 --pretty=oneline --abbrev-commit (if v0.3.2 is not specified, it will just go to HEAD)
- Add header/footer based on format (rpm/deb)
- Save to temp file and open it in nano
- Once nano exits, continue
The only thing is, is that the correct git command to use for the occasion?
-
- Big Beholder
- Posts: 1660
- Joined: Wed Jan 19, 2011 3:45 pm
- Location: /dev/negi
Re: QCMA - Cross-platform content manager for the PSVita (0.
I like the idea to open a temp file with nano to review the entries and remove/edit them. I added some sed magic to remove the commit id and add the " * " (for deb):
To obtain the last tag:
Maybe this could work:
Code: Select all
git log v0.3.1..v0.3.2 --pretty=oneline --abbrev-commit | sed 's/^.\{,7\}/ */'
Code: Select all
git describe --abbrev=0 --tags
Code: Select all
git log $(git describe --abbrev=0 --tags)..HEAD --pretty=oneline --abbrev-commit | sed 's/^.\{,7\}/ */'
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
-
- Retired Mod
- Posts: 2744
- Joined: Fri Nov 05, 2010 5:27 pm
- Location: Over the hills and far away
Re: QCMA - Cross-platform content manager for the PSVita (0.
Should only give the commit messages
Edit: something along these lines?
Code: Select all
latest_tag = subprocess.check_output(["git", "describe", "--tags"]).decode("utf-8").rstrip()
# or latest_tag = 'v0.3.1' for testing purposes
commit_logs = subprocess.check_output(["git", "log", latest_tag + "..", "--pretty=oneline"]).decode("utf-8")
print(re.sub('[0-9a-f]{40} ', '', commit_logs))
Code: Select all
#!/usr/bin/python3
import argparse
import subprocess
import re
import tempfile
from time import strftime
parser = argparse.ArgumentParser(
prog='genlog',
description='Command-line utility to generate changelog files based on version control commit logs',
epilog='Well, on second thought, let\'s not go to Camelot. It is a silly place.')
parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1')
parser.add_argument('-g', '--git', action='store_true', help='use git to retrieve commit logs')
parser.add_argument('-m', '--hg', action='store_true', help='use hg to retrieve commit logs')
parser.add_argument('-d', '--debian', action='store_true', help='create debian-style changelog')
parser.add_argument('-r', '--rpm', action='store_true', help='create rpm-style changelog')
parser.add_argument('-c', '--changelog', default='ChangeLog', help='path to the changelog file to be used')
args = parser.parse_args()
# Check if vcs and style are set
if((args.git is not True and args.hg is not True) or (args.debian is not True and args.rpm is not True)):
print('Invalid parameters. See genspec -h or genspec --help for more information on usage')
quit()
# Retrieve the commit logs
if(args.git):
latest_tag = subprocess.check_output(["git", "describe", "--tags"]).decode("utf-8").rstrip()
commit_logs = subprocess.check_output(["git", "log", latest_tag + "..", "--pretty=oneline"]).decode("utf-8")
commit_logs = re.sub('[0-9a-f]{40} ', '', commit_logs)
elif(args.hg):
latest_tag = subprocess.check_output(["hg", "parents", "--template", "'{latesttag}'"]).decode("utf-8").rstrip()
commit_logs = subprocess.check_output(["hg", "log", "--rev", "tip:" + latest_tag, "--template", "{desc}\n"]).decode("utf-8")
# Prepare commit logs based on format (rpm/deb)
if(args.debian):
# prettify commits
split = commit_logs.splitlines()
commit_logs = ''
for s in split:
commit_logs += ' * ' + s + '\n'
# assemble into entry
commit_logs = 'qcma (0.3.2) unstable; urgency=low\n\n' + commit_logs + '\n'
commit_logs += '-- ' + input('Changelog author: ') + ' <' + input('Changelog author email: ') + '> ' + strftime("%a, %d %b %Y %H:%M:%S %z") + '\n'
elif(args.rpm):
# prettify commits
split = commit_logs.splitlines()
commit_logs = ''
for s in split:
commit_logs += ' - ' + s + '\n'
# assemble into entry
commit_logs = '* ' + strftime("%a %b %d %Y") + ' <' + input('Changelog author: ') + '> ' + input('Version: ') + '\n' + commit_logs
# Open a temporary file and present the commit logs for editing
with tempfile.NamedTemporaryFile(mode='w+') as temp:
temp.write(commit_logs)
temp.flush() # there's a good chance the random text will remain in cache and not get shown otherwise
subprocess.call(["nano", temp.name])
with open(temp.name, 'r') as temp_reader:
commit_logs = temp_reader.read()
# Save new changelog entry at the start of the changelog file
if(input('Save specfile? (y/N) ') == 'y'):
with open(args.changelog, 'r') as output_file:
old_logs = output_file.read()
with open(args.changelog, 'w') as wfile:
wfile.write(commit_logs + '\n' + old_logs)
print('Changelog saved.')
-
- Posts: 60
- Joined: Fri Jul 19, 2013 10:42 am
Re: QCMA - Cross-platform content manager for the PSVita (0.
i was wondering if we can get and automatically start
program when windows starts option for the next release.
program when windows starts option for the next release.
-
- Big Beholder
- Posts: 1660
- Joined: Wed Jan 19, 2011 3:45 pm
- Location: /dev/negi
Re: QCMA - Cross-platform content manager for the PSVita (0.
OK, i will add a checkbox to the end of the installer so you can set qcma to run at windows startup.TheDevilItSelf! wrote:i was wondering if we can get and automatically start
program when windows starts option for the next release.
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..