Improved parsing
This commit is contained in:
parent
917bb5928b
commit
62d593136a
435 changed files with 929 additions and 720 deletions
|
|
@ -2,6 +2,8 @@ import os
|
|||
import json
|
||||
import yaml
|
||||
|
||||
from markdownify import markdownify
|
||||
|
||||
IMPLEMENTATION_TO_TAG_MAPPING = {
|
||||
'ReleaseTitleSpecification': ['Release Title'],
|
||||
'ResolutionSpecification': ['Resolution'],
|
||||
|
|
@ -60,8 +62,9 @@ def collect_custom_format(service, file_name, input_json, output_dir):
|
|||
'name': name,
|
||||
'trash_id': trash_id,
|
||||
'trash_scores': input_json.get('trash_scores', {}),
|
||||
'description': f"""Custom format from TRaSH-Guides.
|
||||
https://trash-guides.info/{service.capitalize()}/{service.capitalize()}-collection-of-custom-formats/#{file_name}""",
|
||||
'description': f"""[Custom format from TRaSH-Guides.](https://trash-guides.info/{service.capitalize()}/{service.capitalize()}-collection-of-custom-formats/#{file_name})
|
||||
|
||||
{markdownify(input_json.get('description', ''))}""",
|
||||
'tags': IMPLEMENTATION_TO_TAG_MAPPING[implementation],
|
||||
'conditions': conditions,
|
||||
'tests': []
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import os
|
|||
import json
|
||||
import yaml
|
||||
|
||||
from markdownify import markdownify
|
||||
|
||||
def get_file_name(profile_name):
|
||||
return profile_name.replace('[', '(').replace(']', ')')
|
||||
|
||||
|
|
@ -86,8 +88,9 @@ def collect_profile(service, input_json, output_dir):
|
|||
trash_id = input_json.get('trash_id', '')
|
||||
yml_data = {
|
||||
'name': name,
|
||||
'description': f"""Profile from TRaSH-Guides.
|
||||
{input_json.get('trash_description', '')}""",
|
||||
'description': f"""[Profile from TRaSH-Guides.](https://trash-guides.info/{service.capitalize()}/{service}-setup-quality-profiles)
|
||||
|
||||
{markdownify(input_json.get('trash_description', ''))}""",
|
||||
'trash_id': trash_id,
|
||||
'tags': [],
|
||||
'upgradesAllowed': input_json.get('upgradeAllowed', True),
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def collect_regex_pattern(service, file_name, input_json, output_dir):
|
|||
yml_data = {
|
||||
'name': name,
|
||||
'pattern': pattern,
|
||||
'description': "Regex pattern from TRaSH-Guides.",
|
||||
'description': "",
|
||||
'tags': [],
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue