Compare commits
No commits in common. "246dd0b734003b00c3361595e031d28d934ee0da" and "466585fe884e6c08aa50323a9ccd5fb598c961fd" have entirely different histories.
246dd0b734
...
466585fe88
2 changed files with 8 additions and 20 deletions
11
README.md
11
README.md
|
@ -11,16 +11,9 @@ We do not yet do summing of time per issue, but could with a fair amount of work
|
|||
In the meantime this can be done with a spreadsheet:
|
||||
|
||||
## Usage
|
||||
For use with Forgejo Include your API token in .env as FORGEJO_API_TOKEN={token}
|
||||
- Token can be generated here if you do not have one: https://git.agaric.com/user/settings/applications
|
||||
|
||||
Download a spreadsheet from Harvest (or, one hopes someday, a better time tracking service).
|
||||
Download a spreadsheet from Harvest (or, one hopes someday, a better time tracking service). Copy the path to the downloaded CSV and paste it in at the prompt when you run:
|
||||
|
||||
Modify the lines starting with 'owner = ' and 'repo =' to use your target project. You may have to add your project details to the 'projects' dictionary
|
||||
|
||||
Run the program with:
|
||||
```bash
|
||||
python generate_issues.py FILE
|
||||
python generate_issues.py
|
||||
```
|
||||
|
||||
The program outputs to 'modified_report.csv'
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import csv
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
import csv
|
||||
import re
|
||||
from dotenv import load_dotenv
|
||||
import requests
|
||||
import sys
|
||||
|
||||
load_dotenv()
|
||||
FORGEJO_API_TOKEN = os.getenv("FORGEJO_API_TOKEN")
|
||||
|
@ -71,6 +70,9 @@ def parse_notes_section(notes):
|
|||
def parse_harvest_csv(file=None):
|
||||
global issues_and_urls
|
||||
|
||||
if file is None:
|
||||
file = prompt_for_file(file)
|
||||
|
||||
print('Beginning parsing for issues')
|
||||
|
||||
with open(file, 'r') as f:
|
||||
|
@ -98,12 +100,5 @@ def parse_harvest_csv(file=None):
|
|||
row_count += 1
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
file_path = sys.argv[1]
|
||||
except Exception as e:
|
||||
print("No file provided, exitting")
|
||||
quit()
|
||||
if file_path:
|
||||
check_for_file(file_path)
|
||||
parse_harvest_csv(file_path)
|
||||
parse_harvest_csv()
|
||||
|
||||
|
|
Loading…
Reference in a new issue