ipfs-shipyard / ipfs-thing-2022

ipfs-ΓΎing-2022
MIT License
11 stars 26 forks source link

Add IPFS Discourse topic "website" links for each track #118

Closed BigLep closed 2 years ago

BigLep commented 2 years ago

See https://github.com/ipfs-shipyard/ipfs-thing-2022/issues/110 for context

Here are the list of files/tracks/URLs added:

b_1_ipfs-impls  πŸ›€ 2022-07-12: IPFS Implementations  https://discuss.ipfs.io/t/2022-07-12-ipfs-implementations/14632
b_2_content-routing-1   πŸ›€ 2022-07-13: Content Routing 1: Performance    https://discuss.ipfs.io/t/2022-07-13-content-routing-1-performance/14633
b_3_content-routing-2   πŸ›€ 2022-07-14: Content Routing 2: Privacy    https://discuss.ipfs.io/t/2022-07-14-content-routing-2-privacy/14634
c_1_data_and_ipfs-1 πŸ›€ 2022-07-13: Data and IPFS: Models https://discuss.ipfs.io/t/2022-07-13-data-and-ipfs-models/14635
c_2_data_and_ipfs-2 πŸ›€ 2022-07-14: Data And IPFS: Transfer   https://discuss.ipfs.io/t/2022-07-14-data-and-ipfs-transfer/14636
c_3_project_and_community   πŸ›€ 2022-07-15: Project & Community   https://discuss.ipfs.io/t/2022-07-15-project-community/14637
c_4_scalable-virtual-worlds.md  πŸ›€ 2022-07-16: Scalable Virtual Worlds   https://discuss.ipfs.io/t/2022-07-16-scalable-virtual-worlds/14638
d_1_connecting-ipfs πŸ›€ 2022-07-13: Connecting IPFS   https://discuss.ipfs.io/t/2022-07-13-connecting-ipfs/14639
d_2_data_and_ipfs-3 πŸ›€ 2022-07-14: Data and IPFS: Unconf https://discuss.ipfs.io/t/2022-07-14-data-and-ipfs-unconf/14640
d_3_browsers_and_web    πŸ›€ 2022-07-15: Browsers and The Web Platform https://discuss.ipfs.io/t/2022-07-15-browsers-and-the-web-platform/14641
d_3_ipfs-wasm   πŸ›€ 2022-07-15: IPFS & WASM   https://discuss.ipfs.io/t/2022-07-15-ipfs-wasm/14642
d_3_roadmap πŸ›€ 2022-07-16: Roadmapping Next Steps out of the IPFS ΓΎing   https://discuss.ipfs.io/t/2022-07-16-roadmapping-next-steps-out-of-the-ipfs-thing/14643
e_3_aqua_ipfs   πŸ›€ 2022-07-14: Aqua and IPFS https://discuss.ipfs.io/t/2022-07-14-aqua-and-ipfs/14645
e_3_measuring_ipfs  πŸ›€ 2022-07-15: Measuring IPFS    https://discuss.ipfs.io/t/2022-07-15-measuring-ipfs/14646

This should be squashed into a single commit.

BigLep commented 2 years ago

This was generated using


from pydiscourse import DiscourseClient
import json
import csv
import io

client = DiscourseClient(
        'https://discuss.ipfs.io/',
        api_username='BigLep',
        api_key='')

# Get the tracks JSON
#  curl https://2022.ipfs-thing.io/events.json -o /tmp/tracks.json
# Manually modify session tracks that want to ignore

with open('/tmp/tracks.json', 'r') as tracks_fp:
    tracks = json.load(tracks_fp)

outputs = []
for file_name, track in tracks.items():
    if "website" in track and "discuss.ipfs.io" in track["website"]:
        print(f"Skipping {file_name} because it has {track['website']}")
        continue 

    title = f"πŸ›€ {track['date']}: {track['name']}"
    content = f"Placeholder for links (e.g., slides, videos) and notes about the talks in https://github.com/ipfs-shipyard/ipfs-thing-2022/tree/main/events/{file_name} .  See https://discuss.ipfs.io/t/about-the-ipfs-thing-2022-category/14608/2 for more info."
    post = client.create_post(content, title=title, category_id=32)
    url = f"https://discuss.ipfs.io/t/{post['topic_slug']}/{post['topic_id']}"
    outputs.append([file_name, title, url ])

with io.StringIO("some initial text data") as formatted_output:
    writer = csv.writer(formatted_output, delimiter='\t')
    writer.writerows(outputs)
    print(formatted_output.getvalue())