Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiles & Formats (Notion & Airtable) #21

Closed
IAmVigneswaran opened this issue Dec 28, 2022 · 34 comments
Closed

Profiles & Formats (Notion & Airtable) #21

IAmVigneswaran opened this issue Dec 28, 2022 · 34 comments
Assignees
Labels
enhancement New feature or request profiles Ideas for new profiles
Milestone

Comments

@IAmVigneswaran
Copy link
Contributor

Continuing the discussion here from here.

Current default format is .csv (For Notion Database)

This could add further complexities. What if there were different "Profiles" for output formats for different database platforms, NLEs and DAWs. For each profiles, the output data extension and structure would formatted in a different way.

Example:
For Notion - the current .csv format and structure.
For ProTools - it could be in a text file that ProTools could import.
For Resolve - it could be in a EDL file.

@orchetect
Copy link
Contributor

orchetect commented Dec 28, 2022

This is definitely possible.

The refactors I've completed so far have separated generic logic form format-specific logic.

All of the file reading/parsing and thumbnail output routines are generic (but could have custom iterators or implementations if needed). Routines that specifically format data for the csv2notion "profile" are clearly abstracted away.

@IAmVigneswaran IAmVigneswaran added the enhancement New feature or request label Dec 28, 2022
@IAmVigneswaran
Copy link
Contributor Author

Having other formats will really open up the interaction with with other application. Users of FCP could send Marker Data information to users other application (ProTools, Resolve, Etc).

Example :
--proflie-format <Notion, Airtable, ProTools, Resolve>

For some profiles like ProTools, we can turn off image extraction?

We can add more profiles of most major DAWs and NLEs based on user's input.

@IAmVigneswaran IAmVigneswaran added this to the 0.4 milestone Dec 28, 2022
@IAmVigneswaran IAmVigneswaran changed the title Other Output Formats Other Output Profiles & Formats Dec 29, 2022
@IAmVigneswaran
Copy link
Contributor Author

@orchetect Can simplicity we rename the current profile has Notion instead of csv2notion?

For 0.2 release, we could also add Airtable profile has well?

For Airtable profile, it would be the identical as Notion. The only difference, it won't generate Marker Icons, and it won't include 'Icon Image' column for the .csv file.

@orchetect orchetect pinned this issue Dec 30, 2022
@orchetect
Copy link
Contributor

we could also add Airtable profile has well?

Sure, I think notion and airtable would be a good place to start for profiles.

CSV is just an implementation detail like we've talked about, so it would be good to refer less to "CSV" directly in the CLI help text and refer to a more abstract term like "metadata file" or "manifest file". Because different profiles may use different file formats besides CSV.

@IAmVigneswaran IAmVigneswaran changed the title Other Output Profiles & Formats Profiles & Formats (Notion & Airtable) Dec 31, 2022
@IAmVigneswaran IAmVigneswaran modified the milestones: 0.4, 0.2 Dec 31, 2022
@orchetect
Copy link
Contributor

orchetect commented Dec 31, 2022

On the whole, the more profiles we add (#21, #23, #24, #25, #26, #27), the more MarkersExtractor becomes a general-purpose conversion utility. I'm not sure how far down that road you want to go.

The ones that can take advantage of the generic processing routines that have already been written are certainly easier to implement and could be implemented sooner.

As for specific targets and file types, they would need to be researched and built (and possibly reverse-engineered).

Along those lines, DAWFileKit (as its name might suggest) implements a few import/export file formats from DAWs and new formats as they are developed could be added to it. Similar to how we're using pipeline as a dependency for FCPXML (since it's such a heavy format it generally deserves a library all its own), DAWFileKit can process various other file types and distils parsed data into format-agnostic data prototypes that can be converted to other encodings. (I've considered renaming it NLEFileKit or TimelineFileKit or something since it's taking on more video editing formats as of recent and isn't necessarily just DAW-centric.)

@orchetect orchetect unpinned this issue Dec 31, 2022
@IAmVigneswaran
Copy link
Contributor Author

On the whole, the more profiles we add (#21, #23, #24, #25, #26, #27), the more MarkersExtractor becomes a general-purpose conversion utility. I'm not sure how far down that road you want to go.

True! The current absolute purpose of this tool to send to databases like Notion or Airtable. Or even Filemaker.

My only intention of opening these additional issues was based on our discussions with your suggestion to future proof the output format beyond the constrains of .csv or confines of csv2notion tool.

Yes, I do understand on how far we could support. Or if there is even a user workflow needed for such a feature. It is all based on user feedback and request.

The ones that can take advantage of the generic processing routines that have already been written are certainly easier to implement and could be implemented sooner.

We could attempt on those general purpose and text formats?

Along those lines, DAWFileKit (as its name might suggest) implements a few import/export file formats from DAWs and new formats as they are developed could be added to it. Similar to how we're using pipeline as a dependency for FCPXML (since it's such a heavy format it generally deserves a library all its own), DAWFileKit can process various other file types and distils parsed data into format-agnostic data prototypes that can be converted to other encodings. (I've considered renaming it NLEFileKit or TimelineFileKit or something since it's taking on more video editing formats as of recent and isn't necessarily just DAW-centric.)

Interesting! Thanks for sharing.

@orchetect
Copy link
Contributor

My only intention of opening these additional issues was based on our discussions with your suggestion to future proof the output format beyond the constrains of .csv or confines of csv2notion tool.

Absolutely. So even if we only implement one or two workflows at the current time, it's valuable for the codebase to be structured in a way where additional formats could be easier to add in future (by myself or someone else).

@orchetect orchetect pinned this issue Dec 31, 2022
@orchetect
Copy link
Contributor

The four .png marker icon assets that we have - are those specific to Notion or is the intention to reuse them for other profiles?

@IAmVigneswaran
Copy link
Contributor Author

IAmVigneswaran commented Dec 31, 2022

The four .png marker icon assets that we have - are those specific to Notion or is the intention to reuse them for other profiles?

Yes, they are specifically for Notion and csv2Notion. csv2Notion has the ability to batch upload icons for Notion.

@orchetect orchetect self-assigned this Jan 1, 2023
@orchetect
Copy link
Contributor

orchetect commented Jan 1, 2023

  • Rename 'csv2notion' profile to 'notion'
  • Further refactor codebase to modularize generic methods used by profiles
  • Add 'airtable' profile

@orchetect
Copy link
Contributor

Are we also still exporting thumbnails for Airtable?

@IAmVigneswaran
Copy link
Contributor Author

Are we also still exporting thumbnails for Airtable?

Yes. Airtable supports full gallery view.

https://support.airtable.com/docs/guide-to-gallery-view
https://support.airtable.com/docs/viewing-attachments-in-airtable

@orchetect
Copy link
Contributor

Really cool. Just out of curiosity, is there a native way to import the CSV/thumbnails to Airtable or are you using a special script/utility?

@IAmVigneswaran
Copy link
Contributor Author

Really cool. Just out of curiosity, is there a native way to import the CSV/thumbnails to Airtable or are you using a special script/utility?

AFAIK, there is no sleek user friendly tool like csv2notion for Airtable.

However, there is the official CSV import extension within Airtable. And yes, you would need to write a small piece of script to batch link the images to the individual records.

@orchetect
Copy link
Contributor

Currently standard markers and chapter markers output "Not Started" for the "Status" field. Is this a special consideration for Notion?

I only ask because standard/chapter markers are not To Do markers and "Not Started" is a bit confusing because it's not applicable. Would it be a problem if this field is left blank for standard/chapter markers?

@IAmVigneswaran
Copy link
Contributor Author

Currently standard markers and chapter markers output "Not Started" for the "Status" field. Is this a special consideration for Notion?

Yes. The status column is for Notion Status. csv2notion has the ability to detect a column that is tagged for Notion Status property.

I only ask because standard/chapter markers are not To Do markers and "Not Started" is a bit confusing because it's not applicable. Would it be a problem if this field is left blank for standard/chapter markers?

The values can't be set blank in order for "status column" to work. Standard and Chapter Markers should be set to "Not Started". Users can obviously customise the values of the Notion Status property within Notion. In order for the upload process to work for all users, we need to match it with the default values.

@orchetect
Copy link
Contributor

Took a fair bit more internal refactors but multiple profile support is now implemented with Notion and Airtable profiles.

Will be in next alpha build.

@orchetect orchetect added the pending closure This issue is completed and will be closed soon label Jan 1, 2023
@IAmVigneswaran
Copy link
Contributor Author

Thanks for the information. I will pass the information to the developer.

@IAmVigneswaran
Copy link
Contributor Author

My bad!

Can we enable json output for both Notion and Airtable profiles in the next build.

We can test with uploading to Notion using CSV2Notion Neo.

TheAcharya/csv2notion-neo#9

Thank you.

@IAmVigneswaran IAmVigneswaran modified the milestones: 0.2.0, 0.2.8 Nov 30, 2023
@orchetect
Copy link
Contributor

orchetect commented Nov 30, 2023

Sure, but probably for 0.2.9.

For the Audio Role & Subrole field, instead of its value being a single string, it will be a JSON array of strings. This is because there can be more than one audio role for a marker/caption and will make parsing easier. As mentioned in the other issue thread (#66 (comment)), we can't use commas to separate roles in a single string since FCP allows role names to contain commas.

@orchetect orchetect modified the milestones: 0.2.8, 0.2.9 Nov 30, 2023
@IAmVigneswaran
Copy link
Contributor Author

we can't use commas to separate roles in a single string since FCP allows role names to contain commas.

True!

We will try and update both Airlift and CSV2Notion Neo to support the new separator for parsing.

Are we using <NULL> or \n for the separator?

Since we are going full on with .json and not bounded by the limitation of .csv.

What is the best separator?

Could they be quotes like "Dialogue.MixL","Dialogue.MixR","Dialogue.Boom-1"

@orchetect
Copy link
Contributor

orchetect commented Nov 30, 2023

CSV currently uses comma without a space (,) as a delimiter for multiple roles but is not ideal so it could be changed to null \n. Quotes does not help and makes reading the CSV more complex. I think quotes are also allowed in role names in FCP so it gets pretty crazy.

For JSON we won't need delimiters. Audio Role & Subrole will be an ordered array, not a single concatenated string. That's the point of preferring JSON. It's more versatile of a data format. It encodes strings so commas and quotes can be used within a string, and they will decode properly without any extra effort.

{
    "Marker ID" : "Marker Data Demo_V2_00:00:20:16",
    ... etc ...
    "Video Role & Subrole" : "Not Assigned",
    "Audio Role & Subrole" : [
        "Dialogue.MixL",
        "Dialogue.MixR",
        "Role, With Comma.Role, With Comma-1",
        "\"Quoted\".\"Quoted\"-1"
    ],
    ... etc ...
},

Based on these FCP audio roles:

Dialogue.MixL
Dialogue.MixR
Role, With Comma.Role, With Comma-1
"Quoted"."Quoted"-1

@IAmVigneswaran
Copy link
Contributor Author

CSV currently uses comma without a space (,) as a delimiter for multiple roles but is not ideal so it could be changed to null \n. Quotes does not help and makes reading the CSV more complex.

Noted!

Since we have decided JSON for both Notion and Airtable. Does it make sense to have a 4th Export Profile just for .csv.?

We can just called it CSV. Just for compatibility with spreadsheet applications.

@orchetect
Copy link
Contributor

orchetect commented Nov 30, 2023

We could do that.

Some fields have been formatted specifically with Notion in mind. I feel like it's only coincidental that Airtable is using the same fields and formats.

I would wonder if a generic CSV profile was offered that we would remove some of the choices/assumptions about formatting that we made for Notion. Or we just leave the data as it is now.

Either way, it's best to create a new issue for a CSV profile if we want that.

@IAmVigneswaran
Copy link
Contributor Author

Noted! Hope we can get JSON working for CSV2Notion Neo within next 2 weeks.

Once that is sorted, we can formalise a generic CSV profile.

@IAmVigneswaran
Copy link
Contributor Author

We have implemented JSON support to CSV2Notion Neo based on previous build of MarkersExtractor (0.2.3) using Airtable Profile.

https://github.com/TheAcharya/csv2notion-neo/actions/runs/7066755647

Have not tested with nested values / ordered arrays yet.

@orchetect
Copy link
Contributor

@milanvarady Notion and Airtable profiles now both output CSV and JSON.

The field data for JSON is identical to the CSV except for the audioRole.

  • In CSV, audioRole is still a single string that is a comma-separated list of audio roles.
  • In JSON, audioRole is an ordered array of strings as described above.

Will be in 0.2.9.

@IAmVigneswaran
Copy link
Contributor Author

But in 0.3.0, let's remove CSV output for both Notion and Airtable profiles? This will prevent any confusion?

Considering #74, we can have separate single CSV and/plus TSV profile? For compatibility with excel and google sheets.

@orchetect
Copy link
Contributor

orchetect commented Dec 5, 2023

Once you've got your tooling moved over to parsing the JSON manifests then we can transition to dedicated CSV/TSV profiles.

@IAmVigneswaran
Copy link
Contributor Author

Now Airlift fully supports parsing of MarkersExtractor's .json data.
https://github.com/TheAcharya/Airlift/releases/tag/v1.0.4

All the nested roles in are now interpreted as Multi-Select column type in Airtable.

Airtable-Roles

Next on the table is updating CSV2Notion Neo.

@IAmVigneswaran
Copy link
Contributor Author

Now CSV2Notion Neo fully supports parsing of MarkersExtractor's .json data.
https://github.com/TheAcharya/csv2notion-neo/releases/tag/v1.1.0

All the nested roles in are now interpreted as Multi-Select column type in Notion Database.

Notion-Multi-Select

Any tweaks in future easily be addressed in both Airlift and CSV2Notion Neo tools.

We can now drop .csv file in both Notion and Airtable Profile and create #74.

@orchetect
Copy link
Contributor

Removed CSV manifest file export for Airtable and Notion profiles. Change will be in 0.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request profiles Ideas for new profiles
Projects
None yet
Development

No branches or pull requests

2 participants