Compare commits
2 commits
d5c4ac18b7
...
0a65f25b60
Author | SHA1 | Date | |
---|---|---|---|
0a65f25b60 | |||
f1499586df |
8 changed files with 22156 additions and 10761 deletions
|
@ -7,7 +7,7 @@
|
|||
"full_title": "Nonviolent communication a language of life",
|
||||
"authors": [
|
||||
{
|
||||
"id": "OL243612A",
|
||||
"ol_author_id": "OL243612A",
|
||||
"name": "Marshall B. Rosenberg"
|
||||
}
|
||||
],
|
||||
|
@ -35,7 +35,7 @@
|
|||
"PuddleDancer Press"
|
||||
],
|
||||
"work": {
|
||||
"id": "OL2018966W",
|
||||
"ol_work_id": "OL2018966W",
|
||||
"title": "Nonviolent Communication",
|
||||
"first_publish_date": "1999",
|
||||
"subjects": [
|
||||
|
@ -68,7 +68,7 @@
|
|||
"Self-improvement"
|
||||
]
|
||||
},
|
||||
"id": "OL27210498M",
|
||||
"ol_edition_id": "OL27210498M",
|
||||
"date_added": "2019-11-09",
|
||||
"date_started": "2024-02-13",
|
||||
"added_by_id": "9781892005281"
|
||||
|
@ -87,7 +87,7 @@
|
|||
"publish_date": "Apr 02, 2017",
|
||||
"authors": [
|
||||
{
|
||||
"id": "OL7477772A",
|
||||
"ol_author_id": "OL7477772A",
|
||||
"name": "Martin Kleppmann"
|
||||
}
|
||||
],
|
||||
|
@ -95,7 +95,7 @@
|
|||
"976434277"
|
||||
],
|
||||
"work": {
|
||||
"id": "OL19293745W",
|
||||
"ol_work_id": "OL19293745W",
|
||||
"title": "Designing Data-Intensive Applications",
|
||||
"subjects": [
|
||||
"Development",
|
||||
|
@ -111,7 +111,7 @@
|
|||
"005.276"
|
||||
]
|
||||
},
|
||||
"id": "OL26780701M",
|
||||
"ol_edition_id": "OL26780701M",
|
||||
"date_added": "2021-06-26",
|
||||
"date_started": "2024-01-17",
|
||||
"added_by_id": "9781449373320"
|
||||
|
@ -191,7 +191,7 @@
|
|||
],
|
||||
"isbn_13": "9781788680523",
|
||||
"work": {
|
||||
"id": "OL15419603W",
|
||||
"ol_work_id": "OL15419603W",
|
||||
"title": "France",
|
||||
"subjects": [
|
||||
"Guidebooks",
|
||||
|
@ -203,101 +203,8 @@
|
|||
"Europe - France"
|
||||
]
|
||||
},
|
||||
"id": "OL50982390M",
|
||||
"ol_edition_id": "OL50982390M",
|
||||
"date_added": "2024-01-02",
|
||||
"date_started": "2023-12-25"
|
||||
},
|
||||
{
|
||||
"edition_name": "1st Basic paperback.",
|
||||
"title": "The design of everyday things",
|
||||
"languages": [
|
||||
"eng"
|
||||
],
|
||||
"subjects": [
|
||||
"Design, Industrial -- Psychological aspects",
|
||||
"Human engineering"
|
||||
],
|
||||
"publish_country": "nyu",
|
||||
"by_statement": "Donald A. Norman.",
|
||||
"publishers": [
|
||||
"Basic Books"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"id": "OL224976A",
|
||||
"name": "Donald A. Norman"
|
||||
}
|
||||
],
|
||||
"number_of_pages": 257,
|
||||
"publish_date": "2002",
|
||||
"work_title": [
|
||||
"Psychology of everyday things"
|
||||
],
|
||||
"isbn_10": "0465067107",
|
||||
"covers": [
|
||||
14428210
|
||||
],
|
||||
"work": {
|
||||
"id": "OL1879162W",
|
||||
"title": "The Psychology of Everyday Things",
|
||||
"first_publish_date": "August 1998",
|
||||
"subjects": [
|
||||
"Ergonomie",
|
||||
"Industrial Psychology",
|
||||
"Industri\u00eble vormgeving",
|
||||
"Industrial Design",
|
||||
"Psychological aspects",
|
||||
"Psychology textbooks",
|
||||
"Psychological aspects of Industrial design",
|
||||
"Textbooks",
|
||||
"Aspect psychologique",
|
||||
"Design",
|
||||
"Humanities textbooks",
|
||||
"Projetos (administracao)",
|
||||
"Human engineering",
|
||||
"Long Now Manual for Civilization",
|
||||
"New York Times reviewed",
|
||||
"Cognitive psychology",
|
||||
"Livres num\u00e9riques",
|
||||
"Ergonomics",
|
||||
"E-books",
|
||||
"BUSINESS & ECONOMICS",
|
||||
"Industries",
|
||||
"Retailing",
|
||||
"Product",
|
||||
"PSYCHOLOGY",
|
||||
"Applied Psychology",
|
||||
"Electronic books",
|
||||
"Industriell formgivning",
|
||||
"Psykologiska aspekter",
|
||||
"Industries / Retailing",
|
||||
"Mechanical Engineering",
|
||||
"Engineering & Applied Sciences",
|
||||
"Industrial & Management Engineering",
|
||||
"Nonfiction",
|
||||
"Art",
|
||||
"Business",
|
||||
"Industrial design--psychological aspects",
|
||||
"Psychology, industrial",
|
||||
"Ts171.4 .n67 1990",
|
||||
"Ts 171.4 n842p 1990",
|
||||
"620.8/2",
|
||||
"Business & economics--industries--retailing",
|
||||
"Psychology--applied psychology",
|
||||
"Design--product",
|
||||
"Industriell formgivning--psykologiska aspekter",
|
||||
"Ts171.4 .n67 2013",
|
||||
"745.2019",
|
||||
"745.2001/9",
|
||||
"Bus057000 psy003000 des011000"
|
||||
]
|
||||
},
|
||||
"id": "OL3702614M",
|
||||
"published_in": [
|
||||
"New York"
|
||||
],
|
||||
"date_added": "2021-12-01",
|
||||
"date_started": "2023-12-24",
|
||||
"read_count": 0
|
||||
}
|
||||
]
|
||||
|
|
9620
data/books/log-preprocess.json
Normal file
9620
data/books/log-preprocess.json
Normal file
File diff suppressed because it is too large
Load diff
8272
data/books/log.json
8272
data/books/log.json
File diff suppressed because it is too large
Load diff
11676
data/books/wishlist.json
11676
data/books/wishlist.json
File diff suppressed because it is too large
Load diff
3134
data/films/log.json
3134
data/films/log.json
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,52 @@
|
|||
[
|
||||
{
|
||||
"id": 182313,
|
||||
"name": "Escape to the House of Mummies Part II",
|
||||
"overview": "Continuing last week's adventure, Team Venture find themselves trapped in the clutches of a bloodthirsty Egyptian cult and their time machine.",
|
||||
"air_date": "2006-07-16",
|
||||
"episode_number": 4,
|
||||
"season_number": 2,
|
||||
"show_id": 2418,
|
||||
"date_added": "2024-02-17",
|
||||
"date_finished": "2024-02-16",
|
||||
"added_by_id": "tt0825198"
|
||||
},
|
||||
{
|
||||
"id": 182312,
|
||||
"name": "Assassinanny 911",
|
||||
"overview": "When Brock is reactivated by O.S.I., he subcontracts his ex-girlfriend, Molotov Cocktease, to protect the Venture Compound from enemies.",
|
||||
"air_date": "2006-07-09",
|
||||
"episode_number": 3,
|
||||
"season_number": 2,
|
||||
"show_id": 2418,
|
||||
"date_added": "2024-02-17",
|
||||
"date_finished": "2024-02-16",
|
||||
"added_by_id": "tt0822286"
|
||||
},
|
||||
{
|
||||
"id": 182311,
|
||||
"name": "Hate Floats",
|
||||
"overview": "Aided by Henchmen 21, 24 and new recruits, The Monarch attempts to rebuild his villainous empire and rekindle his relationship with Dr. Girlfriend.",
|
||||
"air_date": "2006-07-02",
|
||||
"episode_number": 2,
|
||||
"season_number": 2,
|
||||
"show_id": 2418,
|
||||
"date_added": "2024-02-17",
|
||||
"date_finished": "2024-02-16",
|
||||
"added_by_id": "tt0822287"
|
||||
},
|
||||
{
|
||||
"id": 182310,
|
||||
"name": "Powerless in the Face of Death",
|
||||
"overview": "Team Venture struggles to pick up the pieces of their shattered lives and move on in the wake of Hank and Dean's violent and untimely deaths.",
|
||||
"air_date": "2006-06-25",
|
||||
"episode_number": 1,
|
||||
"season_number": 2,
|
||||
"show_id": 2418,
|
||||
"date_added": "2024-02-17",
|
||||
"date_finished": "2024-02-16",
|
||||
"added_by_id": "tt0822288"
|
||||
},
|
||||
{
|
||||
"id": 182307,
|
||||
"name": "Return to Spider-Skull Island",
|
||||
|
@ -97,7 +145,7 @@
|
|||
},
|
||||
{
|
||||
"id": 182304,
|
||||
"name": "Eeney, Meeney, Miney… Magic!",
|
||||
"name": "Eeney, Meeney, Miney\u2026 Magic!",
|
||||
"overview": "Dr. Venture's new experiment has the entire family interested--not to mention trapped inside! The Ventures' strange new neighbor, master of mysticism Dr. Orpheus, may be the only one who can help them escape.",
|
||||
"air_date": "2004-09-04",
|
||||
"episode_number": 5,
|
||||
|
|
|
@ -457,6 +457,9 @@ def cleanup_result(item, media_type) -> dict:
|
|||
del item[field_name]
|
||||
|
||||
if media_type in ["films", "tv-series"]:
|
||||
item["id"] = item["tmdb_id"]
|
||||
del item["id"]
|
||||
|
||||
title_key = "name" if "tv-series" == media_type else "title"
|
||||
|
||||
if f"original_{title_key}" in item and "original_language" in item:
|
||||
|
@ -467,7 +470,7 @@ def cleanup_result(item, media_type) -> dict:
|
|||
del item[f"original_{title_key}"], item["original_language"]
|
||||
|
||||
if "books" == media_type:
|
||||
_, _, item["id"] = item["key"].split("/")
|
||||
_, _, item["ol_id"] = item["key"].split("/")
|
||||
del item["key"]
|
||||
|
||||
for key in ["isbn_10", "isbn_13"]:
|
||||
|
|
45
scripts/re-add_dates.py
Normal file
45
scripts/re-add_dates.py
Normal file
|
@ -0,0 +1,45 @@
|
|||
import json
|
||||
|
||||
with open("./data/books/log.json", "r", encoding="utf-8") as log_file:
|
||||
log_items = json.load(log_file)
|
||||
with open("./data/books/log-preprocess.json", "r", encoding="utf-8") as log_file:
|
||||
old_log_items = json.load(log_file)[2:]
|
||||
|
||||
for i, item in enumerate(log_items[6:]):
|
||||
if "title" in item:
|
||||
title = item["title"]
|
||||
else:
|
||||
title = item["Title"]
|
||||
|
||||
#print(f"Processing '{title}'...")
|
||||
|
||||
for key in ["started", "finished", "added", "read"]:
|
||||
keyCap = key.capitalize()
|
||||
if (f"date_{key}" not in item and f"Date {keyCap}" not in item) or ( (f"date_{key}" in item and "" == item[f"date_{key}"]) or (f"Date {keyCap}" in item and "" == item[f"Date {keyCap}"])):
|
||||
if f"Date {keyCap}" in old_log_items[i]:
|
||||
if "" == old_log_items[i][f"Date {keyCap}"]:
|
||||
print(
|
||||
f"No date_{key} for {title}, and date in old log is empty"
|
||||
)
|
||||
item[f"date_{key}"] = None
|
||||
|
||||
else:
|
||||
print(
|
||||
f"No date_{key} for {title}, taking date {old_log_items[i][f'Date {keyCap}']} from old log"
|
||||
)
|
||||
item[f"date_{key}"] = old_log_items[i][f"Date {keyCap}"]
|
||||
else:
|
||||
print(
|
||||
f"No date_{key} for {title}, no value in old log either."
|
||||
)
|
||||
item[f"date_{key}"] = None
|
||||
|
||||
log_items[i] = item
|
||||
|
||||
#print(f"Finished processing {title}.")
|
||||
|
||||
with open(f"./data/books/log.json", "w", encoding="utf-8") as log_file:
|
||||
json.dump(log_items, log_file, indent=4)
|
||||
|
||||
print(f"Finished processing log.")
|
||||
|
Loading…
Reference in a new issue