Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 10 for read_text (0.2 seconds)

  1. scripts/translate.py

    )
    
    general_prompt_path = Path(__file__).absolute().parent / "general-llm-prompt.md"
    general_prompt = general_prompt_path.read_text(encoding="utf-8")
    
    app = typer.Typer()
    
    
    @lru_cache
    def get_langs() -> dict[str, str]:
        return yaml.safe_load(Path("docs/language_names.yml").read_text(encoding="utf-8"))
    
    
    def generate_lang_path(*, lang: str, path: Path) -> Path:
        en_docs_path = Path("docs/en/docs")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:37:41 GMT 2026
    - 15.8K bytes
    - Click Count (0)
  2. scripts/docs.py

                ("'t", "t"),  # don't -> dont
                ("**", ""),  # **FastAPI**s -> FastAPIs
            ],
        )
    
    
    def get_en_config() -> dict[str, Any]:
        return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8"))
    
    
    def get_lang_paths() -> list[Path]:
        return sorted(docs_path.iterdir())
    
    
    def lang_callback(lang: str | None) -> str | None:
        if lang is None:
            return None
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 17:46:10 GMT 2026
    - 25.4K bytes
    - Click Count (0)
  3. scripts/notify_translations.py

        if not settings.github_event_path.is_file():
            raise RuntimeError(
                f"No github event file available at: {settings.github_event_path}"
            )
        contents = settings.github_event_path.read_text("utf-8")
        github_event = PartialGitHubEvent.model_validate_json(contents)
        logging.info(f"Using GitHub event: {github_event}")
        number = (
            github_event.pull_request and github_event.pull_request.number
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 12.6K bytes
    - Click Count (0)
  4. scripts/people.py

                users[user] = user_data
                users_list.append(user_data)
        return users_list
    
    
    def update_content(*, content_path: Path, new_content: Any) -> bool:
        old_content = content_path.read_text(encoding="utf-8")
    
        new_content = yaml.dump(new_content, sort_keys=False, width=200, allow_unicode=True)
        if old_content == new_content:
            logging.info(f"The content hasn't changed for {content_path}")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 13:51:24 GMT 2026
    - 15K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/core/io/FileUtil.java

         * @param path
         *            The file path. Must not be {@literal null} or empty.
         * @return The text read from the file.
         */
        public static String readText(final String path) {
            assertArgumentNotEmpty("path", path);
            return readText(path, Charset.defaultCharset().name());
        }
    
        /**
         * Reads text from a file using the default encoding.
         *
         * @param file
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Thu Feb 12 12:10:45 GMT 2026
    - 13.2K bytes
    - Click Count (0)
  6. .teamcity/src/test/kotlin/CIConfigIntegrationTests.kt

            exceptions: List<String>,
        ): Boolean {
            srcRoot.walkTopDown().forEach { file ->
                if (file.extension == "groovy" || file.extension == "java") {
                    val originalText = file.readText()
                    val text =
                        originalText
                            .lineSequence()
                            .filterNot { it.trim().startsWith("//") }
                            .joinToString("\n")
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Oct 16 01:27:05 GMT 2025
    - 14.6K bytes
    - Click Count (0)
  7. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/runtimes/CheckTargetRuntimes.kt

         */
        private fun calculateBuildFileMutation(
            projectPath: String,
            computed: Set<TargetRuntime>,
            buildFile: File
        ): BuildFileMutation {
            val lines = buildFile.readText().lines()
    
            val start = lines.indexOfFirst {
                Regex("\\s+computedRuntimes\\s+\\{").matches(it)
            }
            if (start == -1) {
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Wed Mar 11 22:40:18 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  8. src/main/java/org/codelibs/fess/helper/DocumentHelper.java

                                new ByteArrayInputStream(Base64.getUrlDecoder().decode(hash.substring(SIMILAR_DOC_HASH_PREFIX.length())))),
                        Constants.UTF_8))) {
                    return ReaderUtil.readText(reader);
                } catch (final Exception e) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Failed to decode similar document hash: hash={}", hash, e);
                    }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Mon Mar 30 14:27:04 GMT 2026
    - 17.4K bytes
    - Click Count (0)
  9. src/test/java/org/codelibs/fess/helper/SystemHelperTest.java

            FileUtil.writeBytes(designJspFile.getAbsolutePath(), "ok".getBytes());
            fileList = systemHelper.refreshDesignJspFiles();
            assertEquals(1, fileList.size());
            assertEquals("ok", FileUtil.readText(fileList.get(0).toFile()));
        }
    
        @Test
        public void test_updateSystemProperties() {
            final SystemHelper helper = new SystemHelper();
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 28 06:59:19 GMT 2026
    - 44.4K bytes
    - Click Count (0)
  10. fess-crawler-opensearch/src/main/java/org/codelibs/fess/crawler/service/impl/AbstractCrawlerService.java

            if (mappingMetadata == null || mappingMetadata.sourceAsMap().isEmpty()) {
                final AcknowledgedResponse putMappingResponse = fesenClient.get(c -> {
                    final String source = FileUtil.readText("mapping/" + mappingName + ".json");
                    return c.admin().indices().preparePutMapping(index).setSource(source, XContentType.JSON).execute();
                });
                if (putMappingResponse.isAcknowledged()) {
    Created: Sun Apr 12 03:50:13 GMT 2026
    - Last Modified: Thu Nov 20 08:40:57 GMT 2025
    - 34.3K bytes
    - Click Count (0)
Back to Top