added project files, aiff support

This commit is contained in:
Lynne Megido 2020-10-26 23:55:06 +10:00
parent c641c63fda
commit 102edd01a3
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
15 changed files with 457 additions and 7 deletions

4
.gitignore vendored
View file

@ -1,5 +1,7 @@
!bcao.py !bcao.py
!requirements.txt !requirements.txt
!.gitignore !.gitignore
mypy.ini !mypy.ini
!.run/
!.idea/
* *

8
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

13
.idea/bcao.iml Normal file
View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.mypy_cache" />
<excludeFolder url="file://$MODULE_DIR$/samples" />
<excludeFolder url="file://$MODULE_DIR$/test" />
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (bcao)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View file

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="lynne" />
</component>

6
.idea/discord.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
</component>
</project>

View file

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Default" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (bcao)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/bcao.iml" filepath="$PROJECT_DIR$/.idea/bcao.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

315
.idea/workspace.xml Normal file
View file

@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="f581197a-f26b-4fde-b746-e72c0ed1bb2a" name="Default Changelist" comment="my py dot ini">
<change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/bcao.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/dictionaries/lynne.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/discord.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.run/bcao (ceres).run.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.run/bcao.run.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.run/mypy.run.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bcao.py" beforeDir="false" afterPath="$PROJECT_DIR$/bcao.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FlaskConsoleOptions" custom-start-script="import sys&#10;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])&#10;from flask.cli import ScriptInfo&#10;locals().update(ScriptInfo(create_app=None).load_app().make_shell_context())&#10;print(&quot;Python %s on %s\nApp: %s [%s]\nInstance: %s&quot; % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))">
<envs>
<env key="FLASK_APP" value="app" />
</envs>
<option name="myCustomStartScript" value="import sys&#10;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])&#10;from flask.cli import ScriptInfo&#10;locals().update(ScriptInfo(create_app=None).load_app().make_shell_context())&#10;print(&quot;Python %s on %s\nApp: %s [%s]\nInstance: %s&quot; % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))" />
<option name="myEnvs">
<map>
<entry key="FLASK_APP" value="app" />
</map>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RESET_MODE" value="HARD" />
</component>
<component name="JupyterTrust" id="c9c24a84-69f9-4c1e-bffb-78383de38689" />
<component name="ProjectId" id="1iwv1rbtMpCLK7D695td98N37pr" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="com.intellij.ide.scratch.LRUPopupBuilder$1/New Scratch File" value="TEXT" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PythonContentEntriesConfigurable" />
</component>
<component name="RunManager" selected="Python.bcao (ceres)">
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<module name="bcao" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<list>
<item itemvalue="Python.bcao (io)" />
<item itemvalue="Python.bcao (ceres)" />
<item itemvalue="Python.mypy" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="f581197a-f26b-4fde-b746-e72c0ed1bb2a" name="Default Changelist" comment="" />
<created>1602831263913</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1602831263913</updated>
<workItem from="1602831267794" duration="18279000" />
<workItem from="1602850978698" duration="7902000" />
<workItem from="1602908398925" duration="34104000" />
<workItem from="1603714609431" duration="5637000" />
<workItem from="1603720261881" duration="128000" />
</task>
<task id="LOCAL-00001" summary="mp3 support! more helpful interface! better code! yahoo!!">
<created>1602927759343</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1602927759343</updated>
</task>
<task id="LOCAL-00002" summary="fairly major restructuring that should make future format support a lot easier, support for songs with partially or fully incomplete metadata">
<created>1602942890966</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1602942890966</updated>
</task>
<task id="LOCAL-00003" summary="mypy integration">
<created>1603715728224</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1603715728224</updated>
</task>
<task id="LOCAL-00004" summary="put everything in main(), zero mypy issues">
<created>1603716061845</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1603716061845</updated>
</task>
<task id="LOCAL-00005" summary="code cleanup">
<created>1603716273616</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1603716273616</updated>
</task>
<task id="LOCAL-00006" summary="mypy strict support!">
<created>1603717518466</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1603717518466</updated>
</task>
<task id="LOCAL-00007" summary="wav support!">
<created>1603719245013</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1603719245013</updated>
</task>
<task id="LOCAL-00008" summary="my py dot ini">
<created>1603719576507</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1603719576507</updated>
</task>
<option name="localTasksCounter" value="9" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="mp3 support! more helpful interface! better code! yahoo!!" />
<MESSAGE value="fairly major restructuring that should make future format support a lot easier, support for songs with partially or fully incomplete metadata" />
<MESSAGE value="mypy integration" />
<MESSAGE value="put everything in main(), zero mypy issues" />
<MESSAGE value="code cleanup" />
<MESSAGE value="mypy strict support!" />
<MESSAGE value="wav support!" />
<MESSAGE value="my py dot ini" />
<option name="LAST_COMMIT_MESSAGE" value="my py dot ini" />
</component>
<component name="WindowStateProjectService">
<state x="555" y="188" width="800" height="672" key="#Deployment" timestamp="1602927147820">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="555" y="188" width="800" height="672" key="#Deployment/0.0.1920.1055@0.0.1920.1055" timestamp="1602927147820" />
<state x="811" y="199" width="732" height="632" key="#Inspections" timestamp="1602832260834">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="811" y="199" width="732" height="632" key="#Inspections/0.0.1920.1055@0.0.1920.1055" timestamp="1602832260834" />
<state x="697" y="368" width="516" height="313" key="#Notifications" timestamp="1602831592098">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="697" y="368" width="516" height="313" key="#Notifications/0.0.1920.1055@0.0.1920.1055" timestamp="1602831592098" />
<state x="555" y="170" width="800" height="706" key="#Plugins" timestamp="1603714662919">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state x="555" y="170" width="800" height="706" key="#Plugins/0.0.1920.1054@0.0.1920.1054" timestamp="1603714662919" />
<state x="719" y="227" key="#Python" timestamp="1603720389976">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state x="719" y="227" key="#Python/0.0.1920.1054@0.0.1920.1054" timestamp="1603720389976" />
<state x="418" y="185" width="1084" height="709" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1603720315136">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state x="418" y="185" width="1084" height="709" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1054@0.0.1920.1054" timestamp="1603720315136" />
<state x="418" y="185" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602931259631" />
<state x="888" y="193" width="424" height="721" key="#com.intellij.ide.macro.MacrosDialog" timestamp="1602931237546">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="888" y="193" width="424" height="721" key="#com.intellij.ide.macro.MacrosDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602931237546" />
<state x="707" y="363" width="797" height="527" key="#com.intellij.tools.ToolEditorDialog" timestamp="1602908296483">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="707" y="363" width="797" height="527" key="#com.intellij.tools.ToolEditorDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602908296483" />
<state x="549" y="98" width="1059" height="853" key="CommitChangelistDialog2" timestamp="1602927110754">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="549" y="98" width="1059" height="853" key="CommitChangelistDialog2/0.0.1920.1055@0.0.1920.1055" timestamp="1602927110754" />
<state x="100" y="99" width="1720" height="856" key="DiffContextDialog" timestamp="1602915909590">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="100" y="99" width="1720" height="856" key="DiffContextDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602915909590" />
<state x="743" y="285" width="424" height="479" key="FileChooserDialogImpl" timestamp="1602850965686">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="743" y="285" width="424" height="479" key="FileChooserDialogImpl/0.0.1920.1055@0.0.1920.1055" timestamp="1602850965686" />
<state width="1878" height="347" key="GridCell.Tab.0.bottom" timestamp="1603720247732">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.0.bottom/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247732" />
<state width="1878" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1055@0.0.1920.1055" timestamp="1602942953878" />
<state width="1878" height="347" key="GridCell.Tab.0.center" timestamp="1603720247732">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.0.center/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247732" />
<state width="1878" height="282" key="GridCell.Tab.0.center/0.0.1920.1055@0.0.1920.1055" timestamp="1602942953877" />
<state width="1878" height="347" key="GridCell.Tab.0.left" timestamp="1603720247732">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.0.left/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247732" />
<state width="1878" height="282" key="GridCell.Tab.0.left/0.0.1920.1055@0.0.1920.1055" timestamp="1602942953877" />
<state width="1878" height="347" key="GridCell.Tab.0.right" timestamp="1603720247732">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.0.right/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247732" />
<state width="1878" height="282" key="GridCell.Tab.0.right/0.0.1920.1055@0.0.1920.1055" timestamp="1602942953877" />
<state width="1878" height="347" key="GridCell.Tab.1.bottom" timestamp="1603720247733">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.1.bottom/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247733" />
<state width="1878" height="347" key="GridCell.Tab.1.center" timestamp="1603720247733">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.1.center/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247733" />
<state width="1878" height="347" key="GridCell.Tab.1.left" timestamp="1603720247733">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.1.left/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247733" />
<state width="1878" height="347" key="GridCell.Tab.1.right" timestamp="1603720247733">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state width="1878" height="347" key="GridCell.Tab.1.right/0.0.1920.1054@0.0.1920.1054" timestamp="1603720247733" />
<state x="182" y="88" width="1536" height="869" key="MergeDialog" timestamp="1602851077617">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="182" y="88" width="1536" height="869" key="MergeDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602851077617" />
<state x="596" y="306" width="718" height="437" key="MultipleFileMergeDialog" timestamp="1602851077619">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="596" y="306" width="718" height="437" key="MultipleFileMergeDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602851077619" />
<state x="334" y="44" width="1315" height="941" key="SettingsEditor" timestamp="1603720180344">
<screen x="0" y="0" width="1920" height="1054" />
</state>
<state x="334" y="44" key="SettingsEditor/0.0.1920.1054@0.0.1920.1054" timestamp="1603720180344" />
<state x="334" y="44" width="1315" height="941" key="SettingsEditor/0.0.1920.1055@0.0.1920.1055" timestamp="1602927410438" />
<state x="100" y="99" width="1720" height="856" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1602937117208">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="100" y="99" width="1720" height="856" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.0.1920.1055@0.0.1920.1055" timestamp="1602937117208" />
<state x="623" y="232" width="672" height="678" key="search.everywhere.popup" timestamp="1602936893566">
<screen x="0" y="0" width="1920" height="1055" />
</state>
<state x="623" y="232" width="672" height="678" key="search.everywhere.popup/0.0.1920.1055@0.0.1920.1055" timestamp="1602936893566" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/bcao$mypy.coverage" NAME="mypy Coverage Results" MODIFIED="1603717428705" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/bcao$bcao.coverage" NAME="bcao Coverage Results" MODIFIED="1603719196915" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
</project>

24
.run/bcao (ceres).run.xml Normal file
View file

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bcao (ceres)" type="PythonConfigurationType" factoryName="Python">
<module name="bcao" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/venv/bin/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/bcao.py" />
<option name="PARAMETERS" value="&quot;A Cerulean State - As if I remembered something.zip&quot; -d &quot;/tmp/out/&quot;" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/bcao.run.xml Normal file
View file

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bcao (io)" type="PythonConfigurationType" factoryName="Python">
<module name="bcao" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/venv/bin/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/bcao.py" />
<option name="PARAMETERS" value="&quot;Braxton Burks - Time &amp; Space.zip&quot; -d &quot;$USER_HOME$/Documents&quot;" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/mypy.run.xml Normal file
View file

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="mypy" type="PythonConfigurationType" factoryName="Python">
<module name="bcao" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/venv/bin/mypy" />
<option name="PARAMETERS" value="bcao.py" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

13
bcao.py
View file

@ -16,7 +16,7 @@ from os import path
from base64 import b64encode from base64 import b64encode
from zipfile import ZipFile from zipfile import ZipFile
from pathlib import Path from pathlib import Path
from typing import Optional, Union, List, Dict, Any from typing import Optional, Union, List, Dict
# pycharm tells me some of these classes shouldn't be imported because they're not declared in __all__. # pycharm tells me some of these classes shouldn't be imported because they're not declared in __all__.
# however, the mutagen docs show example code where someone creates a mutagen.flac.Picture by referring to it as # however, the mutagen docs show example code where someone creates a mutagen.flac.Picture by referring to it as
@ -33,7 +33,7 @@ from mutagen.id3 import APIC, PictureType, Frame, TRCK, TPE1, TIT2, TALB, TPE2
from PIL import Image from PIL import Image
fully_supported: List[str] = ["ogg", "flac", "mp3", "m4a", "wav"] fully_supported: List[str] = ["ogg", "flac", "mp3", "m4a", "wav", "aiff"]
MutagenFile = Union[MP3, FLAC, OggVorbis, mutagen.FileType] MutagenFile = Union[MP3, FLAC, OggVorbis, mutagen.FileType]
MutagenTags = Union[mutagen.id3.ID3Tags, mutagen.mp4.Tags, mutagen.oggvorbis.OggVCommentDict] MutagenTags = Union[mutagen.id3.ID3Tags, mutagen.mp4.Tags, mutagen.oggvorbis.OggVCommentDict]
args: argparse.Namespace args: argparse.Namespace
@ -53,7 +53,8 @@ class SongInfo:
"m4a": "m4a", "m4a": "m4a",
"ogg": "vorbis", "ogg": "vorbis",
"flac": "vorbis", "flac": "vorbis",
"wav": "id3" "wav": "id3",
"aiff": "id3"
} }
def __init__(self, file_name: Path): def __init__(self, file_name: Path):
@ -155,7 +156,7 @@ class SongInfo:
if self.format == "flac": if self.format == "flac":
return len(self.m_file.pictures) != 0 return len(self.m_file.pictures) != 0
if self.format == "mp3" or self.format == "wav": if self.format in ["mp3", "wav", "aiff"]:
apics: List[APIC] = self.m_tags.getall("APIC") apics: List[APIC] = self.m_tags.getall("APIC")
for apic in apics: for apic in apics:
if apic.type == PictureType.COVER_FRONT: if apic.type == PictureType.COVER_FRONT:
@ -174,7 +175,7 @@ class SongInfo:
elif self.format == "flac": elif self.format == "flac":
self.m_file.clear_pictures() self.m_file.clear_pictures()
self.m_file.add_picture(to_embed) self.m_file.add_picture(to_embed)
elif self.format in ["mp3", "wav"]: elif self.format in ["mp3", "wav", "aiff"]:
self.m_tags.add(to_embed) self.m_tags.add(to_embed)
elif self.format == "m4a": elif self.format == "m4a":
self.m_tags['covr'] = [to_embed] self.m_tags['covr'] = [to_embed]
@ -315,7 +316,7 @@ def main() -> None:
embed_cover.height = image.size[1] embed_cover.height = image.size[1]
embed_cover.depth = image.bits embed_cover.depth = image.bits
elif song_format in ["mp3", "wav"]: elif song_format in ["mp3", "wav", "aiff"]:
# apparently APIC files get compressed on save if they are "large": # apparently APIC files get compressed on save if they are "large":
# https://mutagen.readthedocs.io/en/latest/api/id3_frames.html#mutagen.id3.APIC # https://mutagen.readthedocs.io/en/latest/api/id3_frames.html#mutagen.id3.APIC
# i don't know what that means (lossless text compression? automatic JPEG conversion?) and i don't know if or how # i don't know what that means (lossless text compression? automatic JPEG conversion?) and i don't know if or how